﻿﻿@{
    ViewData["Title"] = "CottageList";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
}

<h1 style="text-align:center">栋舍列表</h1>

<div style="margin:20px 20px">
    <table>
        <tr>
            <td style="padding-bottom:100px">
            </td>
            <td>
                <label class="layui-form-label">栋舍名称</label>
                <div class="layui-input-inline">
                    <input class="layui-input" id="CottageName" autocomplete="off">
                </div>
            </td>
            <td>
            </td>
            <td>
                <button type="button" class="layui-btn layui-btn-primary" id="searchBtn" style="background-color:aqua"><i class="layui-icon"></i> 搜 索</button>
                <div class="layui-inline">
                    <button type="button" class="layui-btn" onclick="onAddBtn()">添加</button>
                </div>
            </td>
        </tr>
    </table>

    <table id="ID-table-demo-setRowChecked"></table>
    <div id="pagesbox"></div>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <div id="add-main" style="display: none;">
        @* 栋舍弹出层 *@

        <form class="layui-form" id="add-form" action="" lay-filter="dataPage">

            <div class="layui-form-item">
                <div class="layui-form-item">
                    <div class="layui-input-group">
                        <div class="layui-input-prefix">
                            栋舍类型
                        </div>
                        <div class="layui-input-block" style="width:500px">
                            <select name="cottageType" id="sheepBreed" lay-filter="breedSelect">
                                <option value="">请选择栋舍类型</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-form-item">
                    <div class="layui-input-group">
                        <div class="layui-input-prefix">
                            栋舍名称
                        </div>
                        <input type="text" name="cottageName" id="cottageName" placeholder="请选择栋舍名称" lay-verify="required" autocomplete="off" class="layui-input" style="width:500px">
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-form-item">
                    <div class="layui-input-group">
                        <div class="layui-input-prefix">
                            负责人
                        </div>
                        <div class="layui-input-block" style="width:510px">
                            <select name="principal" id="romm" lay-filter="breedSelect">
                                <option value="">请选择</option>
                            </select>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-form-item">
                        <div class="layui-input-group">
                            <div class="layui-input-prefix">
                                生产人员
                            </div>
                            <input type="text" name="cottageProduction" id="cottageProduction" placeholder="请选择生产人员" autocomplete="off" lay-verify="required" class="layui-input" style="width:490px">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-form-item">
                        <div class="layui-input-group">
                            <div class="layui-input-prefix">
                                状态
                            </div>

                            <div class="layui-input-block">
                                <input type="radio" id="cottageState" value="true" title="启用" checked>
                                <input type="radio" id="cottageState" value="false" title="禁用">

                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-form-item">
                        <div class="layui-input-group">
                            <div class="layui-input-prefix">
                                备注
                            </div>
                            <textarea name="cottageRemark" id="cottageRemark" placeholder="请输入内容" lay-verify="required" autocomplete="off" class="layui-textarea" style="width:500px"></textarea>
                        </div>
                    </div>
                </div>
                <input type="hidden" name="cottageId" id="cottageId" />
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="save">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary" id="closeBtn">关闭</button>
                    </div>
                </div>
            </div>
        </form>

        <script src="~/js/organization/cottagelist.js"></script>

        <script type="text/html" id="barDemo">
                <div class="layui-btn-container">
                     <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete"><i class="layui-icon layui-icon-delete">删除</i></a>
                     <a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit">编辑</i></a>
                     <a class="layui-btn layui-btn-xs layui-btn-danger" style="background-color:blueviolet" lay-event="add">栏位增加</a>
            </div>
        </script>
